<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Set a callback function which gets invoked when user
  presses the suspend key</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.newt-set-help-callback.html">newt_set_help_callback</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.newt-suspend.html">newt_suspend</a></div>
 <div class="up"><a href="ref.newt.html">Newt 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.newt-set-suspend-callback" class="refentry">

 <div class="refnamediv">
  <h1 class="refname">newt_set_suspend_callback</h1>
  <p class="verinfo">(PECL newt &gt;= 0.1)</p><p class="refpurpose"><span class="refname">newt_set_suspend_callback</span> &mdash; <span class="dc-title">Set a callback function which gets invoked when user
  presses the suspend key</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.newt-set-suspend-callback-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type"><span class="type void">void</span></span> <span class="methodname"><strong>newt_set_suspend_callback</strong></span>
    ( <span class="methodparam"><span class="type"><a href="language.types.callable.html" class="type callable">callable</a></span> <code class="parameter">$function</code></span>
   , <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$data</code></span>
   )</div>

  <p class="para rdfs-comment">
   Set a callback function which gets invoked when user presses the suspend
   key (normally ^Z). If no suspend callback is registered, the suspend
   keystroke is ignored.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.newt-set-suspend-callback-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">function</code></em></dt>

     <dd>

      <p class="para">
       A callback function, which accepts one argument: data
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">data</code></em></dt>

     <dd>

      <p class="para">
       This data is been passed to the callback function
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.newt-set-suspend-callback-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   没有返回值。
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.newt-set-suspend-callback-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.newt-suspend.html" class="function" rel="rdfs-seeAlso">newt_suspend()</a> - Tells newt to return the terminal to its initial state</span></li>
    <li class="member"><span class="function"><a href="function.newt-resume.html" class="function" rel="rdfs-seeAlso">newt_resume()</a> - Resume using the newt interface after calling
  newt_suspend</span></li>
   </ul>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.newt-set-help-callback.html">newt_set_help_callback</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.newt-suspend.html">newt_suspend</a></div>
 <div class="up"><a href="ref.newt.html">Newt 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
